<template>
  <div class="area_simulation" @click="closeSelect">
    <div class="area_simulation_content" @click.stop="resetModal">
      <div class="radio_title">请选择户型</div>
      <div id="warp">
        <mt-radio
          align="right"
          v-model="huxingValue"
          :options="huxingList">
        </mt-radio>
      </div>

      <!--<div>{{areaValue}}</div>-->
    </div>

  </div>
</template>

<script>
  import Vue from 'vue';
  import {Radio} from 'mint-ui';
  import BScroll from 'better-scroll';

  Vue.component(Radio.name, Radio);
  export default {
    props: {
      closeSelect: {
        type: Function
      },
      huxingList: {
        type: Array
      }
    },
    name: 'HuxingSimulation',
    data() {
      return {}
    },
    mounted() {
      let that = this;
      that.$nextTick(() => {
        new BScroll('#warp', {
          click: true
        })
      })
    },
    computed: {
      huxingValue: {
        get() {
          return this.$store.getters.getHuxingRadio;
        },
        set(val) {
          let newValue = val.toString();
          console.log(val);
          console.log(newValue);
          this.$store.commit('setHuxingRadio', newValue);
          this.closeSelect();
        }
      }
    },
    watch: {
      // huxingValue(val){
      //   let newValue = val.toString();
      //   console.log(val);
      //   console.log(newValue);
      //   this.$store.commit('setHuxingRadio',newValue);
      // }
    },
    methods: {
      resetModal() {

      }
      // testOne(){
      //   console.log(this.areaValue)
      // }
    }
  }
</script>

<style scoped>
  /*.area_simulation {*/
    /*width: 100%;*/
    /*box-sizing: border-box;*/
    /*height: calc(100% - 50px);*/
    /*background-color: rgba(0, 0, 0, 0.8);*/
    /*!*opacity: 0.5;*!*/
    /*position: fixed;*/
    /*left: 0;*/
    /*top: 50px;*/
    /*overflow: hidden;*/
    /*z-index: 1;*/
    /*padding: 30px 20px 0 20px;*/
  /*}*/

  /*.area_simulation_content {*/
    /*z-index: 9999;*/
    /*position: absolute;*/
    /*width: calc(100% - 40px);*/
    /*background-color: white !important;*/
  /*}*/

  /*.radio_title {*/
    /*padding: 10px 10px 0 10px;*/
    /*color: #666666;*/
  /*}*/

</style>
